﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Should.Fluent;
using Microsoft.WindowsAzure;

namespace CashFlow.AzureRepository.Tests
{
	[TestClass]
	public class IntegrationTest
	{
		[TestMethod]
		[Ignore]
		public void AppIdentity_GetByKeys()
		{
			var pk = "yahoo";
			//var rk = "https%3a%2f%2fme.yahoo.com%2fa%2fIOEYp8lj29Syy4rohS_RHC19tac-%234703d";
			var rk = "https%3a%2f"; // %2fme.yahoo.com%2fa%2fIOEYp8lj29Syy4rohS_RHC19tac-%234703d";
			//var rk = "11";
			var tableName = "cfappidentities";
			AzureRepositoryBase.StorageAccount = CloudStorageAccount.DevelopmentStorageAccount;
			var repository = new AzureRepositoryBase();

			var entity = repository.GetByKeys<AzureAppIdentity>(tableName, pk, rk);
			//var entity = repository.GetAllByKey<AzureAppIdentity>(tableName, pk).ToList();

			entity.Should().Not.Be.Null();

		}
	}
}
